<?php

namespace Apps\Common\Models;

/**
 * 代理商Model(B端表)
 * @author     chenxiaolin
 * @date        2016年1月19日
 * @version     2.0.0
 * @copyright   Copyright 2016 meelier.com
 */
class Agents extends \PhalconPlus\Database\Model
{

    /**
     *
     * @var integer
     */
    public $agent_id;

    /**
     *
     * @var string
     */
    public $agent_uid;

    /**
     *
     * @var string
     */
    public $agent_pwd;

    /**
     *
     * @var integer
     */
    public $agent_name;

    /**
     *
     * @var integer
     */
    public $agent_tel;

    /**
     *
     * @var string
     */
    public $agent_date;

    /**
     *
     * @var integer
     */
    public $expire_date;

    /**
     *
     * @var string
     */
    public $allow_shop_num;

    /**
     *
     * @var string
     */
    public $used_shop_num;

    public $charge_id;
    
    public $agent_addr;
    
    public $agent_note;
    public $agent_status;

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'cos_agents';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return BeautyParlor[]
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return BeautyParlor
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

    /**
     * Independent Column Mapping.
     * Keys are the real names in the table and the values their names in the application
     *
     * @return array
     */
    public function columnMap()
    {
        return array(
            'agent_id' => 'agent_id',
            'agent_uid' => 'branch_name',
            'agent_pwd' => 'agent_pwd',
            'agent_name' => 'agent_name',
            'agent_tel' => 'agent_tel',
            'agent_date' => 'agent_date',
            'expire_date' => 'expire_date',
            'allow_shop_num' => 'allow_shop_num',
            'used_shop_num' => 'used_shop_num',
        	'charge_id' => 'charge_id',
        	'agent_addr' => 'agent_addr',
        	'agent_note' => 'agent_note',
        	'agent_status' => 'agent_status',
        );
    }


}
